/**
 * Created by Administrator on 2017/11/14.
 */

function check_410() {

    var lastarr = new Array();
    var nowarr = new Array();
    $("input[name='last[]']").each(function () {
        lastarr[$(this).attr('id')] = $(this).val();
    })
    $("input[name='now[]']").each(function () {
        nowarr[$(this).attr('id')] = $(this).val();
    })
    if (parseInt(lastarr['last_c2'])<parseInt(lastarr['last_c3'])){
        return '上年主营业务收入不能高于营业收入';
    }
    if (parseInt(lastarr['last_c2'])<=parseInt(lastarr['last_c5'])){
        return '上年主营业务利润不能高于营业收入';
    }
    if (parseInt(nowarr['now_c2'])<parseInt(nowarr['now_c3'])){
        return '本年主营业务收入不能高于营业收入';
    }
    if (parseInt(nowarr['now_c2'])<=parseInt(nowarr['now_c5'])){
        return '本年主营业务利润不能高于营业收入';
    }

    if (lastarr['last_c11']!='' && lastarr['last_c12']!='' && lastarr['last_c13']!=''){
        if (isNaN(lastarr['last_c11']) || isNaN(lastarr['last_c12']) || isNaN(lastarr['last_c13'])){
            return '请填写数字!';
        }else{
            if (parseInt(lastarr['last_c12'])+parseInt(lastarr['last_c13'])>parseInt(lastarr['last_c11'])){
                return '上年仓储面积不能小于子级分类之和';
            }
        }
    }

    if (nowarr['now_c11']!='' && nowarr['now_c12']!='' && nowarr['now_c13']!=''){
        if (isNaN(nowarr['now_c11']) || isNaN(nowarr['now_c12']) || isNaN(nowarr['now_c13'])){
            return '请填写数字!';
        }else{
            if (parseInt(nowarr['now_c12'])+parseInt(nowarr['now_c13'])>parseInt(nowarr['now_c11'])){
                return '本年仓储面积不能小于子级分类之和';
            }
        }
    }

    if (lastarr['last_c22']!='' && lastarr['last_c23']!='' && lastarr['last_c24']!=''){
        if (isNaN(lastarr['last_c22']) || isNaN(lastarr['last_c23']) || isNaN(lastarr['last_c24'])){
            return '请填写数字!';
        }else{
            if (parseInt(lastarr['last_c23'])+parseInt(lastarr['last_c24'])!=parseInt(lastarr['last_c22'])){
                return '上年大专以上应等于子级分类之和';
            }
        }
    }

    if (nowarr['now_c22']!='' && nowarr['now_c23']!='' && nowarr['now_c24']!=''){
        if (isNaN(nowarr['now_c22']) || isNaN(nowarr['now_c23']) || isNaN(nowarr['now_c24'])){
            return '请填写数字!';
        }else{
            if (parseInt(nowarr['now_c23'])+parseInt(nowarr['now_c24'])!=parseInt(nowarr['now_c22'])){
                return '本年大专以上应等于子级分类之和';
            }
        }
    }

    if (lastarr['last_c22']!='' && !isNaN(lastarr['last_c22'])){
        if (lastarr['last_c26']!='' && !isNaN(lastarr['last_c26'])){
            if (parseInt(lastarr['last_c26'])>parseInt(lastarr['last_c22'])){
                return '上年物流相关专业人数应小于大专以上人数';
            }
        }
    }
    if (nowarr['now_c22']!='' && !isNaN(nowarr['now_c22'])){
        if (nowarr['now_c26']!='' && !isNaN(nowarr['now_c26'])){
            if (parseInt(nowarr['now_c26'])>parseInt(nowarr['now_c22'])){
                return '本年物流相关专业人数应小于大专以上人数';
            }
        }
    }


    return '';
}